Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE


ROWID function

The ROWID data type provides a record identifier that is compatible across OpenEdge and ORACLE databases. Applications that use the ROWID function behave the same way whether they access Progress 4GL or ORACLE records.

By default, the DataServer designates a column to support the ROWID function. It evaluates the indexes available for a table and selects one in the following order:

  1. PROGRESS_RECID column.
  2. Unique index on a single, mandatory, NUMBER column with precision < 10 or undefined and scale 0 or undefined.
  3. Native ROWID.

ORACLE might not provide a native ROWID for views that contain aggregates or perform joins. For one of these views to support the ROWID function, use the Data Dictionary to select a NUMBER column, create a unique index based on it, and designate it as the ROWID.

The Data Dictionary allows you to select a different column to support the ROWID function or to select the native ROWID. See the "Defining the ROWID" section in Chapter 7, "The Data Server Tutorial," for instructions on changing how a table supports ROWID.

The native ROWID typically provides the fastest access to a record. However, the native ROWID does not support the Progress 4GL FIND PREV/LAST statement or cursor repositioning. FIND FIRST/NEXT statements for tables that use the native ROWID as a row identifier have unpredictable results. Qualify the FIND FIRST statement with the USE-INDEX option, as in the following example, to get consistent results across various data sources, as shown:

FIND FIRST customer USE-INDEX cust-num. 

ROWID provides the same functionality as the RECID function, but ROWID is more consistent across data sources. Replace the RECID function with ROWID in existing applications.

Follow these guidelines when using ROWID in applications that you want to deploy across several databases:

See the ROWID function entry in OpenEdge Development: Progress 4GL Reference for more information and examples.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095